<!--
 * @Descripttion:
 * @Author: caijj
 * @Date: 2021-03-19 08:29:56
 * @LastEditors: caijj
 * @LastEditTime: 2021-03-19 08:35:57
-->
<template>
  <el-dropdown
    class="btn-dropdown"
    v-bind="$attrs"
    @command="onExportFile"
  >
    <el-button
      type="success"
      icon="el-icon-download"
      class="btn"
      :loading="$attrs.loading"
    >
      导出报表
      <i class="el-icon-arrow-down el-icon--right" />
    </el-button>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item :command="0">Excel</el-dropdown-item>
      <el-dropdown-item :command="1">CSV</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>
<script>
export default {
  name: 'MultipleDownload',
  methods: {
    onExportFile(downType) {
      this.$emit('onExport', downType);
    }
  }
};
</script>
